<template>
   <div class="continer">
       <div class="top">  
            <a class="avatar" href="/u/f312b45adddf">
                <img :src="imgUrl" alt="头像" class="" />
            </a>
            <div class="title">
                <a class="name" href="/u/f312b45adddf">午月_石坝</a>
            </div>  
            <div class="info">
                <ul>
                    <li>
                        <div class="meta-block">
                            <!-- <a href="/users/f312b45adddf/following"> -->
                            <router-link to="/concern">
                                <p>38</p>
                                关注
                            </router-link>      
                            <el-divider direction="vertical"></el-divider>    
                        </div>
                    </li>
                    <li>
                        <div class="meta-block">
                            <!-- <a href="/users/f312b45adddf/following"> -->
                            <router-link to="/fans">
                                <p>38</p>
                                粉丝 
                            </router-link>      
                            <el-divider direction="vertical"></el-divider>    
                        </div>
                    </li>
                    <li>
                        <div class="meta-block">
                            <!-- <a href="/myDyn"> -->
                            <router-link to="/artical">
                                <p>38</p>
                                我的动态 
                            </router-link>        
                            <el-divider direction="vertical"></el-divider>    
                        </div>
                    </li>
                    <li>
                        <div class="meta-block">
                            <!-- <a href=""> -->
                                <p><br></p>
                            <router-link to="/personalData">
                                   个人资料
                            </router-link>
                            <!-- </a> -->
                        </div>
                    </li>
                </ul>
            </div>
        
       </div>
       <div class="innerText">
           <router-view/>
       </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            imgUrl:'',
        }
    },
    created(){
        this.getData();
    },
    methods:{
        async  getData(){
                if (window.sessionStorage.getItem("user")!="" && window.sessionStorage.getItem("user")!= undefined) {
                        const s =window.sessionStorage.getItem("user");
                    // 向服务器请求数据
                    const {data:res} = await this.$axios.get("user/getAvatorUrl.do?email="+s)//访问后台
                        // console.log(res);
                    if(res!='error'){
                        this.imgUrl=res;
                    }
                      // this.imageUrl='http://localhost:8150/img/avator/985658121@qq.com.png';
                }
            },
    }
}
</script>

<style lang="less" scoped>
.continer{
    width:65%;
    height:100%;
    background-color: azure;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.top{
    height: 6rem;
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}
.avatar{
    > img{
        margin-top: 8px;
        width: 100PX;
        height: 100px;
        border-radius: 50%;
        border: 1px solid rgb(221, 221, 221);
    }
}
.title{
    // background-color: yellowgreen;
    // display: flex;
    height: 50%;
    width: 100px;
    margin-left: 40px;
    position: relative;
    >a{
        // background-color: tomato;
        position: absolute;
        display: block;
        font-size: 18px;
        font-weight: 800;
        // width: 100px;
        // position: relative;
        top: 20%;
    }
}

.info{
    // background-color: aquamarine;
    // display: block;
    // display: flex;
    // justify-content: center;
    height: 50%;
    margin-left: 200px;
    position: absolute;
    bottom: 0px;
    > ul{
        display: flex;
        // justify-content: center;
        justify-content: flex-end;
            margin-left: 50px;
        >li{
            margin-left: 10px;
            text-align: center;
        }
    } 
}
// 左半部分
.innerText{
    // background-color: rosybrown;
    // height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 0.5rem;
    .box-card {
        margin-top: 0.5rem;
        width:100%;
  }
}
</style>